package com.huike.service;

import com.huike.mapper.DeptMapper;
import com.huike.pojo.Dept;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class DeptService {
	@Autowired
	private DeptMapper deptMapper;

	public List<Dept> getDeptList() {
		return  deptMapper.getDeptList();
	}

    public void addDept(Dept dept) {
		deptMapper.addDept(dept);
    }

    public void deleteDept(Integer id) {
		deptMapper.deleteDept(id);
    }

    public Dept getDeptById(Integer id) {
		return deptMapper.getDeptById(id);
    }

	public void updateDept(Dept dept) {
		deptMapper.updateDept(dept);

	}

    public  List<Dept> findDept() {
		return  deptMapper.findDept();
    }
}
